<template>
	<view class="content">
		详情页面
		<table>
			<tr>
				<td>产品名称</td>
				<td><input type="text" style="background-color: antiquewhite;" v-model="Name"></td>
			</tr>
		
			<td>产品价格</td>
			<td><input type="text" style="background-color: antiquewhite;" v-model="Prince"></td>
			</tr>
			<tr>
				<td>产品状态</td>
				<td><input type="text" style="background-color: antiquewhite;" v-model="Status"></td>
			</tr>
		</table>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id : 0,
				Name: "",
				Prince: "",
				Status: "",
			}
		},
		onLoad(id) {
			console.log(id.id)
			this.id = id.id
			this.show()
		},
		methods: {
		show(){
			uni.request({
				url: 'http://127.0.0.1:8080/show', //仅为示例，并非真实接口地址。
				data: {
					id : this.id,
				},
				method: "GET",
				header: {
					'content-type': 'application/x-www-form-urlencoded' //自定义请求头信息
				},
				success: (res) => {
					console.log(res.data)
					this.Name =res.data.Data.Name
					this.Prince =res.data.Data.Prince
					this.Status =res.data.Data.Status
				}
			});
		},
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
